package com.snopy.designPattern.structure.bridge;

import com.snopy.designPattern.structure.bridge.impl.AdvancedRemote;
import com.snopy.designPattern.structure.bridge.impl.BasicRemote;
import com.snopy.designPattern.structure.bridge.impl.Radio;
import com.snopy.designPattern.structure.bridge.impl.Tv;
import com.snopy.designPattern.structure.bridge.inter.Device;

/**
 * @author snopy
 * @version 1.0.0
 * @classname Demo
 * @description
 * @email 77912204@qq.com
 * @date 2022/11/26 22:13
 */
public class Demo {
    public static void main(String[] args) {
        testDevice(new Radio());
        testDevice(new Tv());
    }
    public static void testDevice(Device device){
        BasicRemote basicRemote = new BasicRemote(device);
        basicRemote.power();
        device.printStatus();

        AdvancedRemote advancedRemote = new AdvancedRemote(device);
        advancedRemote.mute();
        device.printStatus();
    }
}
